package com.hnzbxy.api.biz.entity;

import com.wuwenze.poi.annotation.Excel;
import com.wuwenze.poi.annotation.ExcelField;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 教员实体类（含Excel导出注解）
 * 对应数据库表：teacher
 */
@Excel("教员信息表") // Excel表名，与班主任区分
@Table(name = "teacher")
public class Teacher {

    /**
     * 教员记录自增主键
     */
    @Id
    @Column(name = "id")
    @ExcelField(value = "编号", width = 50) // 保持与班主任、User类格式统一
    private Long id;

    /**
     * 教员姓名
     */
    @Column(name = "name")
    @ExcelField(value = "姓名", width = 100)
    private String name;

    /**
     * 教员性别（1=男，2=女）
     */
    @Column(name = "gender")
    @ExcelField(
            value = "性别",
            readConverterExp = "1=男,2=女", // 与班主任性别转换规则一致
            writeConverterExp = "1=男,2=女",
            width = 50
    )
    private Integer gender;

    /**
     * 教员手机号码
     */
    @Column(name = "phone")
    @ExcelField(value = "手机号码", width = 120)
    private String phone;

    /**
     * 教员电子邮箱
     */
    @Column(name = "email")
    @ExcelField(value = "电子邮箱", width = 180)
    private String email;

    /**
     * 教员QQ号
     */
    @Column(name = "qq")
    @ExcelField(value = "QQ号", width = 100)
    private String qq;

    /**
     * 教员微信号
     */
    @Column(name = "wechat")
    @ExcelField(value = "微信号", width = 100)
    private String wechat;

    // 原有Getter、Setter和toString方法保持不变...
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getWechat() {
        return wechat;
    }

    public void setWechat(String wechat) {
        this.wechat = wechat;
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", gender=" + gender +
                ", phone='" + phone + '\'' +
                ", email='" + email + '\'' +
                ", qq='" + qq + '\'' +
                ", wechat='" + wechat + '\'' +
                '}';
    }
}